Utilities for working with impl Trait
s in Rust.
trait_variant
trait_variant
generates a specialized version of a base trait that uses async fn
and/or -> impl Trait
.
For example, if you want a Send
able version of your trait, you'd write:
The trait_variant::make
would generate an additional trait called IntFactory
:
use Future;
Implementers can choose to implement either LocalIntFactory
or IntFactory
as appropriate.
For more details, see the docs for trait_variant::make
.
License and usage notes
Licensed under either of Apache License, Version 2.0 or MIT license at your option.